package com.hxzy.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 功能描述
 *
 * @author tonneyyy
 */
@RestController
//springcloud监听config的配置变化
@RefreshScope
public class ConfigController {

    @Value(value = "${hxzy.version}")
    private String version;

    @Value(value = "${token.security}")
    private String security;

    @GetMapping(value = "/user/version")
    public String getVersion(){
        return version + "_"+ security;
    }
}
